# Example 3 page 46 from "Basic Mechanics of Laminated Composite Plates" # A.T. Nettles # NASA Reference Publication 1351 # a result presented in the paper is wrong (sigma_y @ 45).


In [1]:
import pyPLY

# define the material.


In [2]:
AS4_3501_6 = pyPLY.CompositeMaterial()
AS4_3501_6.define("AS4_3501_6", "imperial", E11=20010000.0, E22=1301000.0, G12=1001000.0, niu12=0.3, thk=0.005)

# define the ply's layers.


In [3]:
layer1 = pyPLY.Lamina()
layer2 = pyPLY.Lamina()
layer3 = pyPLY.Lamina()
layer4 = pyPLY.Lamina()

# define the properties of each layer.
# the parameters are "layer's name", "material number", "ply angle".


In [4]:
layer1.define("Layer_1", 1, 0)
layer2.define("Layer_2", 1, 45)
layer3.define("Layer_3", 1, 45)
layer4.define("Layer_4", 1, 0)

# update the properties. Required after each change of properties.


In [5]:
layer1.update()
layer2.update()
layer3.update()
layer4.update()

# add each defined layer to the laminate stack.


In [6]:
laminate1 = pyPLY.Laminate()
laminate1.add_Lamina(layer1)
laminate1.add_Lamina(layer2)
laminate1.add_Lamina(layer3)
laminate1.add_Lamina(layer4)

# update the properties. Required after each change of properties.


In [7]:
laminate1.update()

# define the loading case.
# the parameters are Nx, Ny, Nz, Mx, My, Mz


In [8]:
load1 = pyPLY.Loading()
load1.define_Load(500,0,0,0,0,0)
load1.apply_To(laminate1)

# after update one can print the laminate properties.


In [9]:
print "A = ", laminate1.A
print "B = ", laminate1.B
print "D = ", laminate1.D


A =  [[ 266841.87075194   49470.0519381    47047.80371499]
 [  49470.0519381    78650.65589197   47047.80371499]
 [  47047.80371499   47047.80371499   61638.10569193]]
B =  [[  0.00000000e+00  -1.59872116e-14  -2.84217094e-14]
 [ -1.59872116e-14  -3.55271368e-14  -2.13162821e-14]
 [ -2.84217094e-14  -2.84217094e-14  -2.13162821e-14]]
D =  [[ 12.28757185   0.60854909   0.39206503]
 [  0.60854909   1.30975099   0.39206503]
 [  0.39206503   0.39206503   1.01415088]]

# pretty print the ply strains and stresses in xy and 12 directions.


In [10]:
from numpy import set_printoptions
set_printoptions(suppress=True)

print "load1.epsilon_K = ", load1.epsilon_K


load1.epsilon_K =  [[ 0.00220625]
 [-0.00069992]
 [-0.00114976]
 [-0.        ]
 [-0.        ]
 [ 0.        ]]

In [11]:
print "     layerNo", "epsx", " epsy", " gammaxy"
for i in range (0, 4):
    strain = load1.list_ply_strains_xy[i*3 + 0]
    print "bottom  ", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])
    strain = load1.list_ply_strains_xy[i*3 + 1]
    print "centroid", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])
    strain = load1.list_ply_strains_xy[i*3 + 2]
    print "top     ", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])


     layerNo epsx  epsy  gammaxy
bottom   1 +0.002206 -0.0006999 -0.00115
centroid 1 +0.002206 -0.0006999 -0.00115
top      1 +0.002206 -0.0006999 -0.00115
bottom   2 +0.002206 -0.0006999 -0.00115
centroid 2 +0.002206 -0.0006999 -0.00115
top      2 +0.002206 -0.0006999 -0.00115
bottom   3 +0.002206 -0.0006999 -0.00115
centroid 3 +0.002206 -0.0006999 -0.00115
top      3 +0.002206 -0.0006999 -0.00115
bottom   4 +0.002206 -0.0006999 -0.00115
centroid 4 +0.002206 -0.0006999 -0.00115
top      4 +0.002206 -0.0006999 -0.00115

In [12]:
print "     layerNo", "sigmax", "    sigmay", "    sigmaxy"
for i in range (0, 4):
    stress = load1.list_ply_stresses_xy[i*3 + 0]
    print "bottom  ", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    stress = load1.list_ply_stresses_xy[i*3 + 1]
    print "centroid", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    stress = load1.list_ply_stresses_xy[i*3 + 2]
    print "top     ", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])


     layerNo sigmax     sigmay     sigmaxy
bottom   1 +4.413e+04 -49.79 -1151.0
centroid 1 +4.413e+04 -49.79 -1151.0
top      1 +4.413e+04 -49.79 -1151.0
bottom   2 +5868.0 +49.79 +1151.0
centroid 2 +5868.0 +49.79 +1151.0
top      2 +5868.0 +49.79 +1151.0
bottom   3 +5868.0 +49.79 +1151.0
centroid 3 +5868.0 +49.79 +1151.0
top      3 +5868.0 +49.79 +1151.0
bottom   4 +4.413e+04 -49.79 -1151.0
centroid 4 +4.413e+04 -49.79 -1151.0
top      4 +4.413e+04 -49.79 -1151.0

In [13]:
print "     layerNo", "eps11", "      eps22", "    gamma12"
for i in range (0, 4):
    strain = load1.list_ply_strains_12[i*3 + 0]
    print "bottom  ", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])
    strain = load1.list_ply_strains_12[i*3 + 1]
    print "centroid", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])
    strain = load1.list_ply_strains_12[i*3 + 2]
    print "top     ", i+1, '{0:+.4}'.format(strain[0,0]), '{0:+.4}'.format(strain[1,0]), '{0:+.4}'.format(strain[2,0])


     layerNo eps11       eps22     gamma12
bottom   1 +0.002206 -0.0006999 -0.00115
centroid 1 +0.002206 -0.0006999 -0.00115
top      1 +0.002206 -0.0006999 -0.00115
bottom   2 +0.0001783 +0.001328 -0.002906
centroid 2 +0.0001783 +0.001328 -0.002906
top      2 +0.0001783 +0.001328 -0.002906
bottom   3 +0.0001783 +0.001328 -0.002906
centroid 3 +0.0001783 +0.001328 -0.002906
top      3 +0.0001783 +0.001328 -0.002906
bottom   4 +0.002206 -0.0006999 -0.00115
centroid 4 +0.002206 -0.0006999 -0.00115
top      4 +0.002206 -0.0006999 -0.00115

In [14]:
print "     layerNo", "sigma11", "      sigma22", "    tau12"
for i in range (0, 4):
    stress = load1.list_ply_stresses_12[i*3 + 0]
    print "bottom  ", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4e}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    stress = load1.list_ply_stresses_12[i*3 + 1]
    print "centroid", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4e}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])
    stress = load1.list_ply_stresses_12[i*3 + 2]
    print "top     ", i+1, '{0:+.4}'.format(stress[0,0]), '{0:+.4e}'.format(stress[1,0]), '{0:+.4}'.format(stress[2,0])


     layerNo sigma11       sigma22     tau12
bottom   1 +4.413e+04 -4.9790e+01 -1151.0
centroid 1 +4.413e+04 -4.9790e+01 -1151.0
top      1 +4.413e+04 -4.9790e+01 -1151.0
bottom   2 +4110.0 +1.8079e+03 -2909.0
centroid 2 +4110.0 +1.8079e+03 -2909.0
top      2 +4110.0 +1.8079e+03 -2909.0
bottom   3 +4110.0 +1.8079e+03 -2909.0
centroid 3 +4110.0 +1.8079e+03 -2909.0
top      3 +4110.0 +1.8079e+03 -2909.0
bottom   4 +4.413e+04 -4.9790e+01 -1151.0
centroid 4 +4.413e+04 -4.9790e+01 -1151.0
top      4 +4.413e+04 -4.9790e+01 -1151.0